package com.hkd.SSM.factory;

import com.hkd.SSM.impl.UserDaoImpl;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;


public class UserDaoFactory implements FactoryBean<UserDaoImpl> {
    @Override
    public UserDaoImpl getObject() throws Exception {
        System.out.println("实例化工厂创建对象中...");
        return new UserDaoImpl();
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return FactoryBean.super.isSingleton();
    }


//    public UserDaoImpl getUserDao() {
//        return new UserDaoImpl();
//    }


}
